Optimal. Leaf size=127 \[ -\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{5/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3745, 482, 541,
12, 385, 213} \begin {gather*} -\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)-b}}\right )}{2 a^{5/2} f}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a+b \sec ^2(e+f x)-b}}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a+b \sec ^2(e+f x)-b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 385
Rule 482
Rule 541
Rule 3745
Rubi steps
\begin {align*} \int \frac {\csc ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^2}{\left (-1+x^2\right )^2 \left (a-b+b x^2\right )^{3/2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {a-b-2 b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^{3/2}} \, dx,x,\sec (e+f x)\right )}{2 a f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {(a-3 b) (a-b)}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 a^2 (a-b) f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-3 b) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 a^2 f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-3 b) \text {Subst}\left (\int \frac {1}{-1+a x^2} \, dx,x,\frac {\sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^2 f}\\ &=-\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{5/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(304\) vs. \(2(127)=254\).
time = 3.65, size = 304, normalized size = 2.39 \begin {gather*} \frac {-\frac {(a+3 b+(a-3 b) \cos (2 (e+f x))) \csc ^2(e+f x) \sec (e+f x)}{\sqrt {2} a^2 \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}+\frac {(a-3 b) \cos (e+f x) \left (2 \tanh ^{-1}\left (\tan ^2\left (\frac {1}{2} (e+f x)\right )-\frac {\sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}}{\sqrt {a}}\right )+\log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}{2 a^{5/2} \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )}}}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(5632\) vs.
\(2(111)=222\).
time = 0.38, size = 5633, normalized size = 44.35
method | result | size |
default | \(\text {Expression too large to display}\) | \(5633\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.80, size = 479, normalized size = 3.77 \begin {gather*} \left [-\frac {{\left ({\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (a^{2} - 5 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a b + 3 \, b^{2}\right )} \sqrt {a} \log \left (-\frac {2 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + a + b\right )}}{\cos \left (f x + e\right )^{2} - 1}\right ) - 2 \, {\left ({\left (a^{2} - 3 \, a b\right )} \cos \left (f x + e\right )^{3} + 3 \, a b \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )}}, \frac {{\left ({\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (a^{2} - 5 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a b + 3 \, b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{a}\right ) + {\left ({\left (a^{2} - 3 \, a b\right )} \cos \left (f x + e\right )^{3} + 3 \, a b \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{2 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{3}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\sin \left (e+f\,x\right )}^3\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________